﻿CREATE TABLE [dbo].[mnContactsOpportunity] (
    [ContactID]         INT NOT NULL,
    [OpportunityID]     INT NOT NULL,
    [OpportunityTypeID] INT NOT NULL,
    CONSTRAINT [PK_mnContactsOpportunity] PRIMARY KEY CLUSTERED ([ContactID] ASC, [OpportunityID] ASC, [OpportunityTypeID] ASC),
    CONSTRAINT [FK_mnContactsOpportunity_datContacts] FOREIGN KEY ([ContactID]) REFERENCES [dbo].[datContacts] ([ContactID]),
    CONSTRAINT [FK_mnContactsOpportunity_datOpportunity] FOREIGN KEY ([OpportunityID]) REFERENCES [dbo].[datOpportunity] ([OpportunityID]),
    CONSTRAINT [FK_mnContactsOpportunity_domOpportunity] FOREIGN KEY ([OpportunityTypeID]) REFERENCES [dbo].[domOpportunity] ([OpportunityTypeID])
);

